//Copyright 2012 Trevin Liberty
//GNU GPL v3
//Author: Trevin Liberty
//
//Base class for all Sprites that have an animation.
//SEE: Sprite.h

#ifndef MOVING_SPRITE_H
#define MOVING_SPRITE_H

#include "Sprite.h"
#include "../Doohickeys/Animator.h"

//See comment at top of file for a complete description
class MovingSprite : public Sprite {
private:
protected:
	Slide* bitmaps;

	Animator* ani;

	bool done;

	//Virtual function to load bitmaps.
	virtual void loadBitmap() = 0;

public:
	MovingSprite();

	//Used to start updating and drawing the sprite at pos
	//	PARAMS:
	//Point<float> pos: Screen position that the sprite will start.
	void start(Point<float> pos);


	//Returns true if the sprite is done.
	//Done is different for every sprite, but usually means it's completed it's animation
	//	at least once.
	bool getDone() {return done;}

	//Virtual function to update the sprite
	//SEE: Sprite.h
	virtual void update() = 0;

	//Virtual function to draw the sprite
	//SEE: Sprite.h
	virtual void draw(Point<float> camPos) = 0;

	virtual void deleteImages() = 0;

};

#endif
